<!--
  描述：家庭关系和联系人详情页
  @author tanghongjun
  @since 2020-05-14 10:48:18
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>新增或编辑分类</title>
</head>
<body>

<div class="layui-fluid">

    <div class="layui-card">
        <form method="post" action="" class="layui-form" lay-filter="zmn-form">

            <input type="hidden" name="familyId" th:value="${staffFamily.familyId}"/>
            <input type="hidden" name="staffId" th:value="${staffFamily.staffId}"/>

            <div class="layui-card-header" style="margin-top:10px;"><b>基本信息</b></div>
            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" >
                        <input type="text" name="familyName" th:value="${staffFamily.familyName}" placeholder="100字以内"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">出生日期</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" >
                        <input type="text" name="birthday" id="birthday" th:value="${staffFamily.birthday}" class="layui-input"
                               placeholder="出生日期" autocomplete="off"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">关系：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" >
                        <select name="relation" id="relation" lay-filter="relation" lay-search>
                            <option value="">-选择-</option>
                            <option th:each="family:${familyList}" th:value="${family.key}"
                                    th:selected="${family.key == staffFamily.relation}" th:text="${family.value}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">性别：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" >
                        <input type="radio" name="sexType" value="1" title="男"
                               th:checked="${staffFamily.sexType == 1}">
                        <input type="radio" name="sexType" value="2" title="女"
                               th:checked="${staffFamily.sexType == 2 || staffFamily.sexType == null }">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">手机号</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" >
                        <input type="text" name="mobile" th:value="${staffFamily.mobile}" placeholder="100字以内"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">是否紧急联系人：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" >
                        <input type="radio" name="emergencyContact" value="2" title="是"
                               th:checked="${staffFamily.emergencyContact == 2 || staffFamily.emergencyContact == null }">
                        <input type="radio" name="emergencyContact" value="1" title="否"
                               th:checked="${staffFamily.emergencyContact == 1}">
                    </div>
                </div>
            </div>

            <zmn th:if="${staffFamily.familyId > 0}">
                <div class="layui-card-header"><b>其他信息</b></div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-form-item layui-form-item-xs">
                    <label class="layui-form-label">修改人/时间</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux"
                             th:text="${staffFamily.updater} + '&nbsp;/&nbsp;' + ${#dates.format(staffFamily.updateTime, 'yyyy-MM-dd HH:mm:ss')}">
                            修改人/时间
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-xs">
                    <label class="layui-form-label">创建人/时间</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux"
                             th:text="${staffFamily.creater} + '&nbsp;/&nbsp;' + ${#dates.format(staffFamily.createTime, 'yyyy-MM-dd HH:mm:ss')}">
                            创建人/时间
                        </div>
                    </div>
                </div>
            </zmn>

            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item layui-layout-admin">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0;">
<!--                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit" th:if="${#authPermit.checkPermit('/staff/stafffamily/addEdit.action')}">保存</button>-->
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit" >保存</button>
                        <button class="layui-btn layui-btn-primary" id="cancel">取消</button>
                    </div>
                </div>
            </div>

        </form>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        staffFamily: [[${staffFamily}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        plat_stafffamily_detail: "staff/stafffamily/zmn.plat.stafffamily.detail",
    }).use(['index', 'plat_stafffamily_detail']);

</script>
</body>
</html>